package com.ymf.page.util;

import com.ymf.page.service.MyService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Init implements InitializingBean {

    @Autowired
    private MyService myService;
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("-----------------缓存预热------------------");
        myService.saveNoticeRedis();
    }
}
